# -*- coding=utf-8 -*-
# Author: Slp
# @Date : 2021-08-25


from time import sleep

from selenium.webdriver.common.by import By

from src.UItest.base_page import BasePage


class ProjectPage(BasePage):
    # 页面元素
    projectNameSearch = (By.ID, 'projectName')
    searchButton = (
    By.XPATH, '//*[@id="root"]/section/section/div[1]/main/div/form/div/div[3]/div/div/div/span/button[1]/span')

    def testSearch(self, url, projectName):
        self.open_url(url)
        self.input(self.projectNameSearch, projectName)
        self.click(self.searchButton)
        sleep(1)
